/**
 * Created by Administrator on 2017/3/22.
 */
var webpack = require('webpack');
var path = require('path');
module.exports = {

    entry:{
        'polyfills': './polyfills.ts',
        'vendor': './vendor.ts',
        'app':'./app/main.ts',
    },
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: '[name].js'
    },
    module: {
        loaders: [
            {
                test: /\.ts$/,
                loader: 'awesome-typescript-loader'
            },
            {
                test: /\.html$/,
                loader: 'html-loader'
            },
        ]
    },
    resolve: {
        extensions: ['.js', '.ts'],
        alias:{
            "bootstrap-table-js": "bootstrap-table/dist/bootstrap-table.min.js",
            "bootstrap-table-js-cn": "bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js",
            "relationshipChart": path.resolve(__dirname, 'js/relationshipChart.js'),
        }
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: ['app', 'vendor', 'polyfills']
        }),
        new webpack.ProvidePlugin({
            "bootstrap-table-js": "bootstrap-table/dist/bootstrap-table.min.js"
        }),
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            }
        })
    ]
};